﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LibBinary.FileData
{
    public class StringData : AbstractFileData
    {
        public string Data;

        public StringData(AbstractFileData parent)
            : base(parent)
        {
        }

        public override AbstractFileData GetChild(int index)
        {
            throw new ReadingFormatException("GetChild in StringData.");
        }

        public override string ToString()
        {
            if (Data == null)
            {
                return "<empty_string>";
            }
            return "\"" + Data + "\"";
        }
    }
}
